<?php $this->load->helper('language'); ?>
<?php if ( count($results)>1 ): ?>
<?php if ( $total_failed<=0 ): ?>
<h2 style="color:green">All <span style="color:white;font-size: 20px"><?php echo count($results); ?></span>  tests passed!!</h2>
<?php else: ?>
<h2 style="color:red"> <?php echo $total_failed." / ".count($results); ?> tests failed!!</h2>
<?php endif; ?>
<?php endif; ?>

<?php $i=0; foreach ($results as $result): ?>          
	<?php if ($result[lang('ut_result')] == lang('ut_passed')): ?>
					
<table class="result" cellpadding="0" cellspacing="0">
                        <tr >
                            <td valign="top" >
                                <div style="float: left;font-size: 15px;padding: 10px;color:black"><?php echo $result[lang('ut_test_name')] ?></div>
                                <div class="pass" >
                                    [PASSED]&nbsp;
                                    <span style="font-weight: normal" > Execution time: <?php echo $timings[$i]?>s</span>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="details">
                                    <?php if ( ! empty($messages[$i])): ?>
                                       
                                                <?php echo $messages[$i]; ?>
                                <?php endif; ?>
                            </td>
                        </tr>
                    </table>


		
	<?php else: ?>
                    <table class="result" cellpadding="0" cellspacing="0">
                        <tr >
                            <td valign="top">
                                 <div style="float: left;font-size: 15px;padding: 10px;color:black"><?php echo $result[lang('ut_test_name')] ?></div>
                                <div class="fail" >
                                [FAILED]&nbsp;
                                <span style="font-weight: normal">Execution time: <?php echo $timings[$i]?>s</span>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="details">
                                    <?php if ( ! empty($messages[$i])): ?>

                                                <?php echo $messages[$i]; ?>
                                <?php endif; ?>
                            </td>
                        </tr>
                    </table>
	<?php endif; ?>
	
<?php $i++; endforeach; ?>
